import Vue from "vue"
import router from "vue-router"

// 动态设置根元素大小
function getSize (screenWidth) {
  if (screenWidth > 540) {
    screenWidth = 540
  }
  else if (screenWidth < 320) {
    screenWidth = 320
  }
  return (screenWidth / 375 * 16).toFixed(2) + 'px'
}

// web端监听窗口改变
const windowResizeCallback = (res) => {
  document.documentElement.style.fontSize = getSize(document.documentElement.offsetWidth || 375)
}
window.onresize = windowResizeCallback

// 首次加载触发
windowResizeCallback()



// 添加路由方法

